package com.example.oss.service;

import javax.servlet.ServletInputStream;

import java.io.IOException;

public interface OssCallbackService {

    /**
     * 从流中获取消息
     *
     * @param is 流
     * @param contentLen 长度
     * @return 消息
     */
    String GetPostBody(ServletInputStream is, int contentLen) throws Exception;

    /**
     * 验证上传回调的数据
     *
     * @param uri
     * @param queryString
     * @param authorizationInput
     * @param pubKeyInput 公钥
     * @param ossCallbackBody 回调消息体
     * @return 验证是否通过
     * @throws NumberFormatException
     * @throws IOException
     */
    boolean VerifyOSSCallbackData(String uri, String queryString, String authorizationInput, String pubKeyInput, String ossCallbackBody) throws Exception;
}
